package com.ethink.warehouse.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.warehouse.api.info.MateInventoryOrderInfo;
import com.ethink.warehouse.api.info.MateInventoryOrderMoreInfo;
import com.ethink.warehouse.api.request.MateInventoryOrderAddRequest;
import com.ethink.warehouse.api.request.MateInventoryOrderQueryRequest;
import com.ethink.warehouse.api.request.MateInventoryOrderUpdateRequest;
import com.ethink.warehouse.api.response.MateInventoryOrderAddResponse;
import com.ethink.warehouse.api.response.MateInventoryOrderDeleteResponse;
import com.ethink.warehouse.api.response.MateInventoryOrderUpdateResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * 入库/出库单 Facade接口
 *
 * @author default
 * @date 2022-12-15
 */
@FeignClient(name = "ethink-warehouse-service", path = "warehouse-service/facade/v1/mateInventoryOrder", contextId = "mateInventoryOrderFacade")
public interface MateInventoryOrderFacade {

    @PostMapping("/queryMateInventoryOrder")
    @ResponseBody
    Page<MateInventoryOrderMoreInfo> queryMateInventoryOrder(@RequestBody MateInventoryOrderQueryRequest request);

    @PostMapping("/getMateInventoryOrderById")
    @ResponseBody
    MateInventoryOrderInfo getMateInventoryOrderById(@RequestParam("mateInventoryOrderId") Long mateInventoryOrderId);

    @PostMapping("/listMateInventoryOrder")
    @ResponseBody
    List<MateInventoryOrderMoreInfo> listMateInventoryOrder(@RequestBody MateInventoryOrderQueryRequest request);

    @PostMapping("/addMateInventoryOrder")
    @ResponseBody
    MateInventoryOrderAddResponse addMateInventoryOrder(@RequestBody MateInventoryOrderAddRequest request);

    @PostMapping("/updateMateInventoryOrder")
    @ResponseBody
    MateInventoryOrderUpdateResponse updateMateInventoryOrder(@RequestBody MateInventoryOrderUpdateRequest request);

    @PostMapping("/deleteMateInventoryOrder")
    @ResponseBody
    MateInventoryOrderDeleteResponse deleteMateInventoryOrder(@RequestParam("mateInventoryOrderId") Long mateInventoryOrderId);

}